package org.base.admin.modules.base;

import javax.servlet.http.HttpServletResponse;

import org.base.common.R;
import org.springframework.boot.web.servlet.error.ErrorController;
import org.springframework.web.bind.annotation.RequestMapping;

public class _404Controller implements ErrorController {
	
	
	private static final String ERROR_PATH = "/error";
	
	@RequestMapping(ERROR_PATH)
	public R handleError() {
		return R.error(HttpServletResponse.SC_NOT_FOUND, "the request url is wrong");
	}

	@Override
	public String getErrorPath() {
		return ERROR_PATH;
	}

}
